﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<%
    if (Request.IsAuthenticated) {
        var test = Session.Contents["user_id"];
%>
    <table>    
        <tr>
            <td><a href="<%: Url.Content("~/") %>"><img alt="Accueil" src="../../App_Themes/Bomberman/Images/home.png" height="30" /><br />Accueil</a></td>
            <td><a href="<%: Url.Content("~/account/details/"+test) %>"><img alt="Mon profil" 
                    src="../../App_Themes/Bomberman/Images/my_account.png" height="30" /><br />Mon profil</a></td>
            <td><a href="<%: Url.Content("~/game") %>"><img alt="Lancer une partie" 
                    src="../../App_Themes/Bomberman/Images/launch_game.png" height="30" /><br />Lancer une partie</a></td>
            <td><a href="<%: Url.Content("~/stats") %>"><img alt="Statistiques" 
                    src="../../App_Themes/Bomberman/Images/statistics.png" height="30" /><br />Statistiques</a></td>
            <td><a href="<%: Url.Content("~/account") %>"><img alt="Liste des joueurs" 
                    src="../../App_Themes/Bomberman/Images/players_list.png" height="30" /><br />Liste des joueurs</a></td>
            <td><a href="<%: Url.Content("~/account/friendlist") %>"><img alt="Liste d'amis" 
                    src="../../App_Themes/Bomberman/Images/friends_list.png" height="30" /><br />Liste d'amis</a></td>
            <td><a href="<%: Url.Content("~/clan") %>"><img alt="Liste des clans" 
                    src="../../App_Themes/Bomberman/Images/clan_list.png" height="30" /><br />Liste des clans</a></td>
            <% if (Session.Contents["UserClanId"] == "") { %>
            <td><a href="<%: Url.Content("~/clan/create") %>"><img alt="Créer un clan" 
                    src="../../App_Themes/Bomberman/Images/add_clan.png" height="30" /><br />Créer un clan</a></td>
            <% } else { %>
            <td><a href="<%: Url.Content("~/clan/details/"+Session.Contents["UserClanId"]) %>">
                <img alt="Mon clan" src="../../App_Themes/Bomberman/Images/my_clan.png" 
                    height="30" /><br />Mon clan</a></td>
            <% } %>
            <td><a href="<%: Url.Content("~/message") %>"><img alt="Messages" 
                    src="../../App_Themes/Bomberman/Images/message.png" height="30" /><br />Messages</a></td>
            <td><a href="<%: Url.Content("~/account/logoff") %>"><img alt="Se déconnecter" 
                    src="../../App_Themes/Bomberman/Images/logout.png" height="30" /><br />Se déconnecter</a></td>

        </tr>
    </table>
<%
    }
    else {
%>
    <table>    
        <tr>
            <td><a href="<%: Url.Content("~/") %>"><img alt="Accueil" src="../../App_Themes/Bomberman/Images/home.png" height="30" /><br />Accueil</a></td>
            <td><a href="<%: Url.Content("~/account/register") %>"><img alt="Inscription" src="../../App_Themes/Bomberman/Images/subscribe.png" height="30" /><br />Inscription</a></td>
            <td><a href="<%: Url.Content("~/account/logon") %>"><img alt="Se connecter" src="../../App_Themes/Bomberman/Images/logon.png" height="30" /><br />Se connecter</a></td>
        </tr>
    </table>
<% } %>